package com.elite.controller;

import com.elite.entity.Help;
import com.elite.service.HelpService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by hbl on 2017/2/3.
 */
@RestController
@RequestMapping("/help")
public class HelpController {
    private static final Logger LOGGER = Logger.getLogger(UserController.class);
    @Autowired
    private HelpService helpService;

//   将意见提交到后台
    @RequestMapping(value = "/setRecord",method = RequestMethod.POST)
    public void setRecord(String feedbackContent,Integer userId){
        Help aHelp = new Help();
        aHelp.setFeedbackContent(feedbackContent);
        aHelp.setUserId(userId);
        helpService.insertRecord(aHelp);
        LOGGER.info(">>>>>>>>>>>>>>>>>>>"+feedbackContent+">>>>>"+userId);
    }

}
